/*
 * @Author: 韩旭
 * @Date: 2022-01-12 10:52:43
 * @Last Modified by: 韩旭
 * @Last Modified time: 2022-01-13 10:23:34
 */

import { App } from 'vue';
import md5 from 'md5';
import * as getUuid from './uuid';

export const UTILS = {
  md5,
  getUuid,
};

declare module '@vue/runtime-core' {
  interface ComponentCustomProperties {
    $utils: typeof UTILS;
  }
}

export function setupUtils(app: App) {
  app.config.globalProperties.$utils = UTILS;
}
